﻿using Microsoft.Practices.CompositeWeb;
using Microsoft.Practices.ObjectBuilder;

namespace CSC440TeamOne.MyHealth.Views
{
    public class MyProgressPresenter : Presenter<IMyProgressView>
    {

        // NOTE: Uncomment the following code if you want ObjectBuilder to inject the module controller
        //       The code will not work in the Shell module, as a module controller is not created by default

        private IMyHealthController _controller;

        public MyProgressPresenter([CreateNew] IMyHealthController controller)
        {
            _controller = controller;
        }

        public override void OnViewLoaded()
        {
            // TODO: Implement code that will be executed every time the view loads
        }

        public override void OnViewInitialized()
        {
            // TODO: Implement code that will be executed the first time the view loads

            View.Show(_controller.LoadHealthProgressForCurrentUser());
        }

        // TODO: Handle other view events and set state in the view
    }
}




